package edu.friday.service;

import edu.friday.common.result.TreeSelect;
import edu.friday.model.SysMenu;
import edu.friday.model.vo.RouterVO;
import edu.friday.model.vo.SysMenuVO;

import java.util.List;
import java.util.Set;

public interface SysMenuService {

    List<SysMenu> selectMenuAll();

    List<Long> selectMenuListByRoleId(Long roleId);

    List<Long> selectMenuRoleId(Long roleId);

    Set<String> selectMenuPermsByUserId(Long userId);

    List<SysMenu> selectMenuList(SysMenuVO menuVO, Long userId);

    SysMenu selectMenuById(Long menuId);

    List<TreeSelect> buildMenuTreeSelect(List<SysMenuVO> menuVOS);
    List<SysMenuVO> buildMenuTree(List<SysMenuVO> menuVOS);

    List<SysMenu> selectMenuList(Long userId);

    String checkMenuNameUnique(SysMenu menu);

    int insertMenu(SysMenu menu);

    int updateMenu(SysMenu menu);

    int deleteMenuById(Long menuId);

    boolean checkMenuExistRole(Long menuId);

    boolean hasChildByMenuId(Long menuId);

    List<SysMenuVO> selectMenuTreeByUserId(Long userId);

    List<RouterVO> buildMenus(List<SysMenuVO> menus);
}
